package com.learn.springcloud.feigncodingconfigurationprovider.controller;

import com.learn.springcloud.feigncodingconfigurationprovider.bean.User;
import org.springframework.web.bind.annotation.*;

/**
 * @Time : 2018/8/8 19:45
 * @Version : 1.0
 */
@RestController
public class FeignCodingConfigurationProvider {

    @RequestMapping(value = "/feign/coding/config/provider/say/hello", method={RequestMethod.GET, RequestMethod.POST})
    String sayHello1(@RequestParam(value = "name") String name){
        return "hello, " + name;
    }

    @RequestMapping(value = "/feign/coding/config/provider/say/hello2", method={RequestMethod.GET, RequestMethod.POST})
    User sayHello2(@RequestBody User user){
        System.out.println(user);
        return user;
    }

}
